#!/bin/sh

#安装自启动
#cp -f ./cn-helm.service /etc/systemd/system/
#cp -f ./cn-helm.service /lib/systemd/system/
#systemctl daemon-reload
#sudo systemctl enable cn-helm.service
#启动
#sudo systemctl restart cn-helm.service

#测试
#sudo systemctl is-enabled cn-helm.service
#systemctl status cn-helm.service

#root@master:/home/cn/project/carbon-data-access# cp flink-function/target/dependency/* /home/app/flink/lib/
#root@master:/home/cn/project/carbon-data-access# cp flink-datasource/target/dependency/* /home/app/flink/lib/
#root@master:/home/cn/project/carbon-data-access# cp flink-datasource/target/flink-datasource-0.0.1-SNAPSHOT.jar /home/app/flink/lib/
#cp carbon dependecn flink 
#
#
#sudo systemctl disable missionx.service
#Removed "/etc/systemd/system/default.target.wants/missionx.service".
#root@master:/home/app/energy-storage-helm-data# sudo systemctl enable missionx.service
#Created symlink /etc/systemd/system/default.target.wants/missionx.service -> /lib/systemd/system/missionx.service.


cp -f ./missionx.service /lib/systemd/system/
systemctl daemon-reload

sudo systemctl disable missionx.service
sleep 1

sudo systemctl enable missionx.service
sleep 1
sudo systemctl is-enabled missionx.service

sleep 1
sudo systemctl start missionx.service

sleep 1
sudo systemctl status missionx.service


#cp last application.xmm .
#cp last db .
